﻿using IBLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace API.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class LoginController : ControllerBase
    {
        public LoginController(LoginIBLL Db)
        {
            this.Db = Db;
        }

        public LoginIBLL Db { get; }
        [HttpGet]
        public Login Deng(string name, string pwd)
        {
            pwd = MD5Hash.Hash.GetMD5(pwd);
            return Db.Deng(name, pwd);
        }
    }
}
